www.gusucode.com > 乘风广告联盟系统(Access版) v4.9 > 乘风广告联盟系统(Access版) v4.9\code\Action\User\gbooklist.asp

    <%
'乘风广告联盟系统 Access版
'作者QQ:178575
'作者EMail:yliangcf@163.com
'作者网站:http://www.qqcf.com
'详细简介:http://www.qqcf.com/cfwztg.htm
'上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容
'因为这些内容可能时常更新,就没有放在程序里,请自己上网站查看
%>
<%
Sql="Select * From CFWztg_Gbook Where UserName='"&UserName&"' And Assort=1 Order By ID Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not rs.eof then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 rs.pagesize=10
 totalrs=rs.RecordCount
 totalpage=rs.pageCount
 mypagesize=rs.pagesize
 rs.absolutepage=page
End If
%>
<table class="tb_1">
  <tr> 
    <td colspan="5">
	<a href="?action=gbookadd" class="t_button">我要留言</a>
    </td>
  </tr>
  <tr  class="tr_1"> 
    <td>序 号</td>
    <td>内容</td>
    <td>加入时间</td>
    <td>管理员回复</td>
    <td>回复时间</td>
  </tr>
  <%
While not rs.eof and mypagesize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(page)+mypagesize%></td>
    <td><%=rs("Content")%></td>
    <td><%=rs("AddTime")%></td>
    <td><%
If Rs("Reply")="" or isnull(Rs("Reply")) Then
 Response.write "请等待管理员的回复"
Else
 Response.write rs("Reply")
End If%></td>
    <td><%=rs("ReplyTime")%></td>
  </tr>
  <%
mypagesize=mypagesize-1
rs.movenext
Wend%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&Page=1">第一页</a>
            <%
if page>1 then%>
            <a href='?Action=<%=Action%>&Page=<%=Page-1%>'>上一页</a>
            <%
end if
%>
            <%
if page<rs.pagecount   then%>
            <a href='?Action=<%=Action%>&Page=<%=Page+1%>'>下一页</a>
            <%
end if
%>
            <a href="?Action=<%=Action%>&Page=<%=totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页&nbsp;&nbsp;共<%=totalrs%>条记录&nbsp;&nbsp;每页显示<%=rs.pagesize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 response.write "<option value=?Action="&action&"&Page="& i
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>
  </tr>
</table>